package com.insurance.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 合作方登录用户实体
 * @version 1.0
 * @date 2021/2/26
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class InsurancePartner {

    /**
     * 合作方名称
     */
    private String partnerName;

    /**
     * 合作方编码
     */
    private String partnerCode;

    /**
     * 合作方账号
     */
    private String appId;

    /**
     * 权限
     */
    private List<String> permission;

    public InsurancePartner(PartnerInfoEntity partnerInfoEntity){
        this.partnerName = partnerInfoEntity.getPartnerName();
        this.partnerCode = partnerInfoEntity.getPartnerCode();
        this.appId = partnerInfoEntity.getAppId();
    }

    public InsurancePartner(PartnerInfoEntity partnerInfoEntity, List<String> permission){
        this.partnerName = partnerInfoEntity.getPartnerName();
        this.partnerCode = partnerInfoEntity.getPartnerCode();
        this.appId = partnerInfoEntity.getAppId();
        this.permission = permission;
    }

}
